This invention relates to a gray scale transformation circuit and, more particularly, to a gray scale transformation circuit for an image processing unit for recognizing patterns, gray levels, etc.
In recent years, inspections for defects in industrial products have become automated. For example, after a molding process, a picture of the molded IC device is taken by an industrial TV (ITV) camera to inspect the defect of the molded IC device. The picture image is electronically transferred to an image processing unit via an input interface. In the image processing unit, mold defects of the IC device are detected. The input interface receives an analog video signal from the ITV camera and generates a digital data signal (i.e., digital data stream) suitable for defect inspection. In the input interface, an analog-to-digital conversion process is performed, and then a gray scale transformation process is performed. In the preceding process, the analog video signal is quantized at a predetermined time interval to be converted to a plurality of digital data. Each digital data has a predetermined word length of 8 bits for instance. In this case, the digital data represents a gray level of the picture element of the picture image as corresponding to one of 256 different numerical values. In the preceding process, the digital data are successively converted to different values according to a predetermined transformation (function) formula. The predetermined transformation formula is set for each purpose for which the gray scale transformation is performed. The main purposes are to obtain digital data which clearly represents the position of the molded IC device and to obtain digital data clearly showing the difference of the gray level of the surface of the molded IC device.
General-purpose digital computers, digital hardware circuits and analog hardware circuits are well known as means for performing gray scale transformation. The general-purpose digital computer performs a function calculation according to the program sequence for a predetermined gray scale transformation. Unless the program sequence is simple, the gray transformation is time-consuming. The quantization interval of the analog-to-digital conversion should be set to a sufficiently small value to obtain a high image resolution. From this standpoint, a long gray scale transformation period is undesirable. Therefore, general-purpose computers are not suitable for high-speed gray scale transformation. formation.
With digital or analog hardware circuits the gray scale transformation can be performed in a shorter period of time compared with general-purpose computers. This is because there is no need to fetch programs. However, each hardware circuit is designed to have a specific structure corresponding to a specified function. Therefore, where different functions are required for different purposes, it is necessary to prepare a plurality of circuits, and when the functions are of a non-linear type, the circuit structure design becomes very complicated.
Further, where a plurality of ITV cameras are cooperatively utilized in the defect inspection, it is necessary to compensate for such things as the sensitivity difference characteristics between the ITV cameras. In the prior art, a plurality of analog hardware circuits are provided corresponding to the number of ITV cameras to compensate for the difference in sensitivity through the co-operative use of the hardware circuits. Where the gray scale transformation is performed for two different purposes as noted above, it is necessary to provide double the number of the hardware circuits. Consequently, a large number of hardware circuits having different structures have to be designed, which is expensive.